package com.tools.cleanmaster.functionpage;


/**
 * CreatedXXX on 17/8/3.
 */
public enum FunctionItem {
    CPUCOOL, CPUOVER, BATTERYOVER, BATTERY, BOOSTER, BOOSTEROVER;

    public static FunctionItem getItemByKey(String name) {
        for (FunctionItem item : values()) {
            if (item.toString().equals(name)) {
                return item;
            }
        }
        return null;
    }

    /**
     * 如果是Over的话类型
     * @param item
     * @return
     */
    public static boolean isOverByItem(FunctionItem item) {
        switch (item) {
            case CPUCOOL:
            case BATTERY:
            case BOOSTER:
                return false;
            default:
                return true;
        }
    }
}
